# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=tftp-hpa
pkgver=5.2
pkgrel=3
pkgdesc="Official tftp server"
url="https://www.kernel.org/pub/software/network/tftp/"
arch="all"
license="BSD"
subpackages="$pkgname-doc"
source="https://www.kernel.org/pub/software/network/tftp/tftp-hpa/$pkgname-$pkgver.tar.xz
	in.tftpd.initd
	in.tftpd.confd
	"

build() {
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--mandir=/usr/share/man
	make
}

package() {
	make INSTALLROOT="$pkgdir" install
	install -d "$pkgdir"/var/tftpboot
	install -Dm755 "$srcdir"/in.tftpd.initd "$pkgdir"/etc/init.d/in.tftpd
	install -Dm644 "$srcdir"/in.tftpd.confd "$pkgdir"/etc/conf.d/in.tftpd
}

sha512sums="a5198e923a6e58281f749dc77b3f3ed8579e56b6f0fd6a17482cc88bdc8d34b6702c7c709717885b9b937ecae459d9a832328a49a2e3536dc7432cdb39d2a394  tftp-hpa-5.2.tar.xz
a836823eda80e43b8914b7b045b91703faded83d2b1482a0d17f0fb903cbc0ce17dd9e0c06a2f6e35724099614ef5a74d9ba8be80237fbbb29c632cea983779a  in.tftpd.initd
8a5de40dde8a5e569fce4309e01341a77a4e36cdcb5fe602948d5b34ee2646bd83840158d7d61a45c17e71cc893f3e9bd04a38ebcc7a6a8fff98f46a50d74e96  in.tftpd.confd"
